package com.sergiandreplace.walkshop.server.util;

public class TextUtil {

	public static boolean isEmpty(String str) {
		if (str == null) {
			return true;
		} else {
			return str.trim().length() == 0;
		}
	}

	public static boolean isAnyEmpty(String... strs) {
		for (String str : strs) {
			if (isEmpty(str)) {
				return true;
			}
		}
		return false;
	}
	
	public static boolean isLonger(String field, int maxLength) {
		if (isEmpty(field)) {
			return false;
		}
		return field.length()>maxLength;
	}
	
	

}
